package com.gen.springbootserver.controller;

import com.gen.springbootserver.utils.mybatis.GeneratorSqlmap;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;


@Api(value = "/mybatis", tags = "mybatis module")
@RestController
@RequestMapping("/mybatis")
public class MybatisController {

        @ApiOperation(value = "mybatis:generate entity", notes = "mybatis:generate entity")
        @ResponseBody
        @PostMapping("/generator")
        public void generator() {
                try {
                        GeneratorSqlmap generatorSqlmap = new GeneratorSqlmap();
                        generatorSqlmap.generator();
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }
}
